acl: Security fixes
cover acl: Security fixes
From: Darsh Kelaiya <[email protected]>
Backport the upstream fixes for CVE-2026-54369 and CVE-2026-54370 to ACL 2.3.2.
CVE-2026-54369 adds descriptor-relative ACL APIs so callers can control symlink traversal. CVE-2026-54370 uses those APIs to harden getfacl, setfacl, setfacl --restore and chacl against path replacement races and unsafe symlink traversal.
Retain ACL 2.3.2 on the stable Wrynose branch and backport the security fixes with the required _at APIs and helper dependencies. This follows OE-Core's focus on security and bug fixes for stable branches [1], avoiding a general recipe upgrade to ACL 2.4.0. Existing pathname API behavior is preserved.
The new public acl_*_at declarations conflict with private helpers using the same names in GNU tar 1.35. Patch 1 backports the upstream tar rename before patches 2 and 3 introduce and consume the new ACL APIs.
[1] https://docs.yoctoproject.org/6.0/ref-manual/release-process.html#stable-release-process
Darsh Kelaiya (3):
tar: avoid name conflicts with new libacl APIs
acl: fix CVE-2026-54369
acl: fix CVE-2026-54370
.../tar/tar/Avoid-acl_-prefix-for-functions.patch | 103 ++ meta/recipes-extended/tar/tar_1.35.bb | 1 + .../attr/acl/CVE-2026-54369-dependent_p1.patch | 69 ++ .../attr/acl/CVE-2026-54369-dependent_p2.patch | 200 ++++ .../attr/acl/CVE-2026-54369-dependent_p3.patch | 712 +++++++++++++ meta/recipes-support/attr/acl/CVE-2026-54369_p1.patch | 719 +++++++++++++ meta/recipes-support/attr/acl/CVE-2026-54369_p2.patch | 957 ++++++++++++++++++ meta/recipes-support/attr/acl/CVE-2026-54369_p3.patch | 109 ++ .../attr/acl/CVE-2026-54370-dependent_p1.patch | 168 +++ .../attr/acl/CVE-2026-54370-dependent_p2.patch | 761 ++++++++++++++ .../attr/acl/CVE-2026-54370-dependent_p3.patch | 439 ++++++++ .../attr/acl/CVE-2026-54370-dependent_p4.patch | 140 +++ meta/recipes-support/attr/acl/CVE-2026-54370_p1.patch | 299 ++++++ meta/recipes-support/attr/acl/CVE-2026-54370_p2.patch | 403 ++++++++ meta/recipes-support/attr/acl/CVE-2026-54370_p3.patch | 603 +++++++++++ meta/recipes-support/attr/acl/CVE-2026-54370_p4.patch | 213 ++++ meta/recipes-support/attr/acl_2.3.2.bb | 14 + 17 files changed, 5910 insertions(+) create mode 100644 meta/recipes-extended/tar/tar/Avoid-acl_-prefix-for-functions.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369-dependent_p1.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369-dependent_p2.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369-dependent_p3.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369_p1.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369_p2.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369_p3.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p1.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p2.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p3.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p4.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370_p1.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370_p2.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370_p3.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370_p4.patch
Signature · 1 line
2.35.6
PATCH 1/3 tar: avoid name conflicts with new libacl APIs
From: Darsh Kelaiya <[email protected]>
The following CVE-2026-54369 backport introduces public libacl acl_get_file_at(), acl_set_file_at() and acl_delete_def_file_at() declarations that conflict with GNU tar 1.35's private helpers.
Backport upstream commit 08c3fc2e9337094aff01a511170fd35fdb8f1ee3 to rename tar's helpers and their callers to tar_acl_* names. Adapt the calls to tar 1.35's existing directory-fd interface.
Apply this compatibility change before introducing the new libacl declarations so ACL-enabled tar continues to compile. The upstream announcement explicitly identifies this namespace conflict [1]. This is a build-compatibility prerequisite, not a separate CVE fix.
Upstream commit:
https://cgit.git.savannah.gnu.org/cgit/tar.git/commit/?id=08c3fc2e9337094aff01a511170fd35fdb8f1ee3
--- .../tar/Avoid-acl_-prefix-for-functions.patch | 103 ++++++++++++++++++ meta/recipes-extended/tar/tar_1.35.bb | 1 + 2 files changed, 104 insertions(+) create mode 100644 meta/recipes-extended/tar/tar/Avoid-acl_-prefix-for-functions.patch
meta/recipes-extended/tar/tar/Avoid-acl_-prefix-for-functions.patch new file +103 -0
@@ -0,0 +1,103 @@ +From 2c34d378e3b4a63339ed7f6d82a6486402d5616a Mon Sep 17 00:00:00 2001 +From: Pavel Cahyna <[email protected]> +Date: Wed, 24 Jun 2026 18:45:30 +0200 +Subject: [PATCH] Avoid acl_ prefix for functions + +The acl.h header from libacl uses acl_ prefix for its functions. Avoid +defining functions with the same name in order to protect its namespace. + +Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/tar.git/commit/?id=08c3fc2e9337094aff01a511170fd35fdb8f1ee3] + +Backport Changes: +- Adapt helper calls to tar 1.35's chdir_fd/file_name arguments + instead of upstream's newer fdbase interface. +- Keep the existing acl_delete_def_file_at and acl_set_file_at + diagnostic text to preserve tar 1.35's gettext message IDs. + Diagnostic strings cannot conflict with libacl declarations. + Omitting those two diagnostic renames gives 13 insertions and + 13 deletions instead of upstream's 15 insertions and deletions. + +(cherry picked from commit 08c3fc2e9337094aff01a511170fd35fdb8f1ee3) +Signed-off-by: Darsh Kelaiya <[email protected]> +--- + src/xattrs.c | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) + +diff --git a/src/xattrs.c b/src/xattrs.c +index 86a7e59c..bf2c4f0e 100644 +--- a/src/xattrs.c ++++ b/src/xattrs.c +@@ -139,13 +139,13 @@ static struct + #ifdef HAVE_POSIX_ACLS + + /* acl-at wrappers, TODO: move to gnulib in future? */ +-static acl_t acl_get_file_at (int, const char *, acl_type_t); +-static int acl_set_file_at (int, const char *, acl_type_t, acl_t); ++static acl_t tar_acl_get_file_at (int, const char *, acl_type_t); ++static int tar_acl_set_file_at (int, const char *, acl_type_t, acl_t); + static int file_has_acl_at (int, char const *, struct stat const *); +-static int acl_delete_def_file_at (int, char const *); ++static int tar_acl_delete_def_file_at (int, char const *); + +-/* acl_get_file_at */ +-#define AT_FUNC_NAME acl_get_file_at ++/* tar_acl_get_file_at */ ++#define AT_FUNC_NAME tar_acl_get_file_at + #define AT_FUNC_RESULT acl_t + #define AT_FUNC_FAIL (acl_t)NULL + #define AT_FUNC_F1 acl_get_file +@@ -159,8 +159,8 @@ static int acl_delete_def_file_at (int, char const *); + #undef AT_FUNC_POST_FILE_PARAM_DECLS + #undef AT_FUNC_POST_FILE_ARGS + +-/* acl_set_file_at */ +-#define AT_FUNC_NAME acl_set_file_at ++/* tar_acl_set_file_at */ ++#define AT_FUNC_NAME tar_acl_set_file_at + #define AT_FUNC_F1 acl_set_file + #define AT_FUNC_POST_FILE_PARAM_DECLS , acl_type_t type, acl_t acl + #define AT_FUNC_POST_FILE_ARGS , type, acl +@@ -170,8 +170,8 @@ static int acl_delete_def_file_at (int, char const *); + #undef AT_FUNC_POST_FILE_PARAM_DECLS + #undef AT_FUNC_POST_FILE_ARGS + +-/* acl_delete_def_file_at */ +-#define AT_FUNC_NAME acl_delete_def_file_at ++/* tar_acl_delete_def_file_at */ ++#define AT_FUNC_NAME tar_acl_delete_def_file_at + #define AT_FUNC_F1 acl_delete_def_file + #define AT_FUNC_POST_FILE_PARAM_DECLS + #define AT_FUNC_POST_FILE_ARGS +@@ -299,7 +299,7 @@ xattrs__acls_set (struct tar_stat_info const *st, + /* No "default" IEEE 1003.1e ACL set for directory. At this moment, + FILE_NAME may already have inherited default acls from parent + directory; clean them up. */ +- if (acl_delete_def_file_at (chdir_fd, file_name)) ++ if (tar_acl_delete_def_file_at (chdir_fd, file_name)) + WARNOPT (WARN_XATTR_WRITE, + (0, errno, + _("acl_delete_def_file_at: Cannot drop default POSIX ACLs " +@@ -316,7 +316,7 @@ xattrs__acls_set (struct tar_stat_info const *st, + return; + } + +- if (acl_set_file_at (chdir_fd, file_name, type, acl) == -1) ++ if (tar_acl_set_file_at (chdir_fd, file_name, type, acl) == -1) + /* warn even if filesystem does not support acls */ + WARNOPT (WARN_XATTR_WRITE, + (0, errno, +@@ -357,10 +357,10 @@ acls_get_text (int parentfd, const char *file_name, acl_type_t type, + char *val = NULL; + acl_t acl; + +- if (!(acl = acl_get_file_at (parentfd, file_name, type))) ++ if (!(acl = tar_acl_get_file_at (parentfd, file_name, type))) + { + if (errno != ENOTSUP) +- call_arg_warn ("acl_get_file_at", file_name); ++ call_arg_warn ("tar_acl_get_file_at", file_name); + return; + } + +-- +2.35.6
meta/recipes-extended/tar/tar_1.35.bb +1 -0
@@ -46,6 +46,7 @@ SRC_URI += " \ file://CVE-2026-5704-dependent_p2.patch \ file://CVE-2026-5704.patch \ file://CVE-2026-5704-regression.patch \ + file://Avoid-acl_-prefix-for-functions.patch \ " inherit ptest
Signature · 1 line
2.35.6
Patchtest results for [OE-core][wrynose][PATCH 1/3] tar: avoid name conflicts with new libacl APIs
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:
---
Testing patch /home/patchtest/share/mboxes/wrynose-1-3-tar-avoid-name-conflicts-with-new-libacl-APIs.patch
FAIL: test CVE tag format: Missing or incorrectly formatted CVE tag in patch file. Correct or include the CVE tag in the patch with format: "CVE: CVE-YYYY-XXXX" (test_patch.TestPatch.test_cve_tag_format)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test Signed-off-by presence (test_patch.TestPatch.test_signed_off_by_presence)
PASS: test Upstream-Status presence (test_patch.TestPatch.test_upstream_status_presence_format)
PASS: test auh changelog truncation notice (test_mbox.TestMbox.test_auh_changelog_truncation_notice)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)
SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: pretest src uri left files: Patch cannot be merged (test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: Patch cannot be merged (test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
---
Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!
PATCH 2/3 acl: fix CVE-2026-54369
In reply to Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Darsh Kelaiya <[email protected]>
Backport the libacl _at API implementation [1] identified by [2] to ACL 2.3.2. These directory-relative APIs support AT_SYMLINK_NOFOLLOW and AT_EMPTY_PATH. Existing pathname APIs retain their historical symlink-following behavior; callers must adopt the new interfaces.
Include the following prerequisite changes:
Extract visibility-hidden.h [5]. The proc-self-fd compatibility helpers introduced by [7] include this header and use its hidden annotation for internal declarations.
Add xattrat syscall wrappers [6]. The compatibility functions in
[7] call these wrappers when libc lacks the corresponding interfaces. Include only the errno.h correction from [10] so errno and ENOSYS are declared in the fallback paths.
Add xattrat compatibility implementations [7]. The new ACL APIs use these functions to support older kernels and unsupported O_PATH/AT_EMPTY_PATH combinations through the fallbacks described upstream [9].
Include API documentation [3] and clarification of the legacy functions' symlink behavior [4] so applications can correctly adopt the new interfaces [8]. These documentation changes explain the security-relevant behavior without changing the legacy API contract.
The shared helpers and new APIs also support the following CVE-2026-54370 utility hardening. The preceding tar change prevents name conflicts with the newly introduced libacl declarations.
[1] https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=5906d2868ec8d3b08be556153696e6b1122eeeda
[2] https://security-tracker.debian.org/tracker/CVE-2026-54369
[3] https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=0071c6d1fea0a8a6270333baa85fb609be325c26
[4] https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=170dbd3beff9bd5bdab3f72db1a04bf282f6087c
[5] https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=60d3c0c7539f4082ab963c9b20a8fa3ac0fbc73e
[6] https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=4eb92d4d449d16fdae4f9ba332809ff9bfd47e65
[7] https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=ea0b56cdd9b3d537da2366dacbbfc93fefce152a
[8] https://www.openwall.com/lists/oss-security/2026/06/29/1#:~:text=Instead%2C%20version%202.4.0,control%20when%20to%20follow%20symbolic%20links.
[9] https://www.openwall.com/lists/oss-security/2026/06/29/1#:~:text=The%20xattrat%28%29%20system%20calls,these%20operations%20will%20fail.
[10] https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=a009adf38ed8cf3cc2ad8bfb7060630caba0bdaa
--- .../acl/CVE-2026-54369-dependent_p1.patch | 69 ++ .../acl/CVE-2026-54369-dependent_p2.patch | 200 ++++ .../acl/CVE-2026-54369-dependent_p3.patch | 712 +++++++++++++ .../attr/acl/CVE-2026-54369_p1.patch | 719 +++++++++++++ .../attr/acl/CVE-2026-54369_p2.patch | 957 ++++++++++++++++++ .../attr/acl/CVE-2026-54369_p3.patch | 109 ++ meta/recipes-support/attr/acl_2.3.2.bb | 6 + 7 files changed, 2772 insertions(+) create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369-dependent_p1.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369-dependent_p2.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369-dependent_p3.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369_p1.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369_p2.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369_p3.patch
meta/recipes-support/attr/acl/CVE-2026-54369-dependent_p1.patch new file +69 -0
@@ -0,0 +1,69 @@ +From 104000f79a011db7731d8fcfdfbdb750d79a62b7 Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher <[email protected]> +Date: Fri, 12 Jun 2026 16:56:37 +0200 +Subject: [PATCH] Split off visibility attribute header + +CVE: CVE-2026-54369 +Upstream-Status: Backport [https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=60d3c0c7539f4082ab963c9b20a8fa3ac0fbc73e] + +Signed-off-by: Andreas Gruenbacher <[email protected]> +(cherry picked from commit 60d3c0c7539f4082ab963c9b20a8fa3ac0fbc73e) +Signed-off-by: Darsh Kelaiya <[email protected]> +--- + include/Makemodule.am | 1 + + include/misc.h | 8 +------- + include/visibility-hidden.h | 11 +++++++++++ + 3 files changed, 13 insertions(+), 7 deletions(-) + create mode 100644 include/visibility-hidden.h + +diff --git a/include/Makemodule.am b/include/Makemodule.am +index 89bc669..dd95135 100644 +--- a/include/Makemodule.am ++++ b/include/Makemodule.am +@@ -3,6 +3,7 @@ noinst_HEADERS += \ + include/acl.h \ + include/acl_ea.h \ + include/misc.h \ ++ include/visibility-hidden.h \ + include/walk_tree.h + + SUBST_INSTALL_HEADER = \ +diff --git a/include/misc.h b/include/misc.h +index 52cfec4..ec095d9 100644 +--- a/include/misc.h ++++ b/include/misc.h +@@ -20,13 +20,7 @@ + + #include <stdio.h> + #include <sys/types.h> +- +-/* Mark library internal functions as hidden */ +-#if defined(HAVE_VISIBILITY_ATTRIBUTE) +-# define hidden __attribute__((visibility("hidden"))) +-#else +-# define hidden /* hidden */ +-#endif ++#include "include/visibility-hidden.h" + + hidden int __acl_high_water_alloc(void **buf, size_t *bufsize, size_t newsize); + +diff --git a/include/visibility-hidden.h b/include/visibility-hidden.h +new file mode 100644 +index 0000000..2d02731 +--- /dev/null ++++ b/include/visibility-hidden.h +@@ -0,0 +1,11 @@ ++#ifndef VISIBILITY_HIDDEN_H ++#define VISIBILITY_HIDDEN_H ++ ++/* Mark library internal functions as hidden */ ++#if defined(HAVE_VISIBILITY_ATTRIBUTE) ++# define hidden __attribute__((visibility("hidden"))) ++#else ++# define hidden /* hidden */ ++#endif ++ ++#endif /* VISIBILITY_HIDDEN_H */ +-- +2.35.6 +
meta/recipes-support/attr/acl/CVE-2026-54369-dependent_p2.patch new file +200 -0
200 lines not on this page · raw message
meta/recipes-support/attr/acl/CVE-2026-54369-dependent_p3.patch new file +712 -0
712 lines not on this page · raw message
meta/recipes-support/attr/acl/CVE-2026-54369_p1.patch new file +719 -0
719 lines not on this page · raw message
meta/recipes-support/attr/acl/CVE-2026-54369_p2.patch new file +957 -0
957 lines not on this page · raw message
meta/recipes-support/attr/acl/CVE-2026-54369_p3.patch new file +109 -0
109 lines not on this page · raw message
meta/recipes-support/attr/acl_2.3.2.bb +6 -0
@@ -18,6 +18,12 @@ DEPENDS = "attr" SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.tar.gz \ file://0001-libmisc-__acl_get_uid-fix-memory-wasting-loop-if-use.patch \ file://0001-test-misc.test-Don-t-mix-stdout-and-stderr.patch \ + file://CVE-2026-54369-dependent_p1.patch \ + file://CVE-2026-54369-dependent_p2.patch \ + file://CVE-2026-54369-dependent_p3.patch \ + file://CVE-2026-54369_p1.patch \ + file://CVE-2026-54369_p2.patch \ + file://CVE-2026-54369_p3.patch \ file://run-ptest \ " SRC_URI[sha256sum] = "5f2bdbad629707aa7d85c623f994aa8a1d2dec55a73de5205bac0bf6058a2f7c"
Signature · 1 line
2.35.6
PATCH 3/3 acl: fix CVE-2026-54370
In reply to Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Darsh Kelaiya <[email protected]>
Backport the getfacl [1], setfacl [3], setfacl --restore [4] and chacl [5] hardening identified by [2]. These changes use directory descriptors and symlink-safe operations instead of repeatedly resolving full pathnames. They require the new APIs and shared compatibility helpers from the preceding CVE-2026-54369 backport.
Include the following prerequisite changes:
Add fchmodat compatibility code [6]. Hardened setfacl uses this for permission changes when the kernel lacks the required AT_SYMLINK_NOFOLLOW or AT_EMPTY_PATH support.
Rename the original walker to old_walk_tree [7]. This preserves its callers while the new walker interface is introduced and stages their migration; the rename does not itself fix the CVE.
Add the directory-fd-based walk_tree implementation [8]. The getfacl and setfacl fixes use its callback interface to operate relative to directory descriptors.
Add openat2 detection and a syscall wrapper [9]. The restore fix uses this interface with RESOLVE_NO_SYMLINKS to resolve directory components without following symbolic links.
Preserve upstream compatibility behavior [10-12]: physical restore uses -P; non-physical restore remains available with warnings when openat2 support is enabled. Physical directory resolution fails rather than silently falling back when openat2 is unavailable.
Retain ACL 2.3.2's .test harness and include the upstream restore regression test as restore-symlinks.test so ptest packages it without the root/restore.test exclusion.
[1] https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=2ee940139e9bba5005a3d987a6daecdda909089e
[2] https://security-tracker.debian.org/tracker/CVE-2026-54370
[3] https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=2c03ceefa0610d551d9cc089ce0a404cbe2d34b4
[4] https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=54e14e9bc545f505b379d0792a2748d9baf88700
[5] https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=601cc884a548ae9e9d246ae749e54b3272e4b1d7
[6] https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=c3492ef76587ce1e652bbb1bdf99f8ea6224b364
[7] https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=f7210d140298ccc73b2b1713635e7c39d58a8eeb
[8] https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=39b00348f5911e4e5937ddfb079cc456288b3cd3
[9] https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=7244f425227a23533f0b0b41c717dbd59736b907
[10] https://www.openwall.com/lists/oss-security/2026/06/29/1#:~:text=%2D%20When%20walking%20directory%20trees,throughout%20the%20code.
[11] https://www.openwall.com/lists/oss-security/2026/06/29/1#:~:text=Support%20for%20specific%20AT_%2A%20flags,these%20operations%20will%20fail.
[12] https://www.openwall.com/lists/oss-security/2026/06/29/1#:~:text=%2D%20As%20mentioned%20above%2C%20the%20%2D%2Drestore%20option,the%20operation%20will%20fail.
--- .../acl/CVE-2026-54370-dependent_p1.patch | 168 ++++ .../acl/CVE-2026-54370-dependent_p2.patch | 761 ++++++++++++++++++ .../acl/CVE-2026-54370-dependent_p3.patch | 439 ++++++++++ .../acl/CVE-2026-54370-dependent_p4.patch | 140 ++++ .../attr/acl/CVE-2026-54370_p1.patch | 299 +++++++ .../attr/acl/CVE-2026-54370_p2.patch | 403 ++++++++++ .../attr/acl/CVE-2026-54370_p3.patch | 603 ++++++++++++++ .../attr/acl/CVE-2026-54370_p4.patch | 213 +++++ meta/recipes-support/attr/acl_2.3.2.bb | 8 + 9 files changed, 3034 insertions(+) create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p1.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p2.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p3.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p4.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370_p1.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370_p2.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370_p3.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370_p4.patch
meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p1.patch new file +168 -0
@@ -0,0 +1,168 @@ +From 9e97fa6569529fe28af7839f0e83e3a01eb631ab Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher <[email protected]> +Date: Tue, 16 Jun 2026 22:44:07 +0200 +Subject: [PATCH] Add fchmodat syscall backwards compatibility code + +Support for the AT_SYMLINK_NOFOLLOW flag was added in commit 09da082b07bb +("fs: Add fchmodat2()") and support for the AT_EMPTY_PATH flag was added in +commit 5daeb41a6fc9d ("fchmodat2: add support for AT_EMPTY_PATH"), both +merged in kernel version 6.6 from October 2023. + +Add a fchmodat_compat() wrapper that detects when the kernel doesn't support +those features and fall back to chmod("/proc/self/fd/<dirfd>", mode) when +necessary. + +CVE: CVE-2026-54370 +Upstream-Status: Backport [https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=c3492ef76587ce1e652bbb1bdf99f8ea6224b364] + +Signed-off-by: Andreas Gruenbacher <[email protected]> +(cherry picked from commit c3492ef76587ce1e652bbb1bdf99f8ea6224b364) +Signed-off-by: Darsh Kelaiya <[email protected]> +--- + include/Makemodule.am | 1 + + include/fchmodat_compat.h | 12 ++++++ + libmisc/Makemodule.am | 1 + + libmisc/fchmodat_compat.c | 88 +++++++++++++++++++++++++++++++++++++++ + 4 files changed, 102 insertions(+) + create mode 100644 include/fchmodat_compat.h + create mode 100644 libmisc/fchmodat_compat.c + +diff --git a/include/Makemodule.am b/include/Makemodule.am +index 36fc1c3..30d1fda 100644 +--- a/include/Makemodule.am ++++ b/include/Makemodule.am +@@ -2,6 +2,7 @@ noinst_HEADERS += \ + include/libacl.h \ + include/acl.h \ + include/acl_ea.h \ ++ include/fchmodat_compat.h \ + include/misc.h \ + include/visibility-hidden.h \ + include/walk_tree.h \ +diff --git a/include/fchmodat_compat.h b/include/fchmodat_compat.h +new file mode 100644 +index 0000000..c10f8ad +--- /dev/null ++++ b/include/fchmodat_compat.h +@@ -0,0 +1,12 @@ ++#ifndef FCHMODAT_COMPAT_H ++#define FCHMODAT_COMPAT_H ++ ++#include <fcntl.h> ++ ++int fchmodat_compat(int dirfd, const char *pathname, mode_t mode, int flags); ++ ++#ifndef DECLARATIONS_ONLY ++# define fchmodat fchmodat_compat ++#endif ++ ++#endif /* FCHMODAT_COMPAT_H */ +diff --git a/libmisc/Makemodule.am b/libmisc/Makemodule.am +index 4099098..07b03c6 100644 +--- a/libmisc/Makemodule.am ++++ b/libmisc/Makemodule.am +@@ -5,6 +5,7 @@ noinst_HEADERS += \ + + libmisc_la_SOURCES = \ + libmisc/uid_gid_lookup.c \ ++ libmisc/fchmodat_compat.c \ + libmisc/getxattrat_compat.c \ + libmisc/high_water_alloc.c \ + libmisc/listxattrat_compat.c \ +diff --git a/libmisc/fchmodat_compat.c b/libmisc/fchmodat_compat.c +new file mode 100644 +index 0000000..dd2a8b8 +--- /dev/null ++++ b/libmisc/fchmodat_compat.c +@@ -0,0 +1,88 @@ ++/* ++ File: fchmodat_compat.c ++ ++ Copyright (C) 2026 Andreas Gruenbacher <[email protected]> ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, see <https://www.gnu.org/licenses/>. ++*/ ++ ++#include "config.h" ++#include <unistd.h> ++#include <fcntl.h> ++#include <sys/stat.h> ++#include <errno.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include "libmisc/proc-self-fd.h" ++ ++#define DECLARATIONS_ONLY ++#include "fchmodat_compat.h" ++ ++/* ++ * Support for the AT_SYMLINK_NOFOLLOW flag was added in commit 09da082b07bb ++ * ("fs: Add fchmodat2()") and support for the AT_EMPTY_PATH flag was added in ++ * commit 5daeb41a6fc9d ("fchmodat2: add support for AT_EMPTY_PATH"), both ++ * merged in kernel version 6.6 from October 2023. ++ */ ++ ++static int no_symlink_nofollow; ++ ++int fchmodat_compat(int dirfd, const char *pathname, mode_t mode, int flags) ++{ ++ struct proc_self_fd_buffer buffer; ++ int fd = dirfd; ++ int ret; ++ ++ if ((flags & AT_SYMLINK_NOFOLLOW) && no_symlink_nofollow) ++ goto no_symlink_nofollow; ++ if ((flags & AT_EMPTY_PATH) && no_symlink_nofollow) { ++ if (!*pathname) ++ goto proc_self_fd_path; ++ flags &= ~AT_EMPTY_PATH; ++ } ++ ret = fchmodat(dirfd, pathname, mode, flags); ++ if (ret != -1) ++ return ret; ++ if (errno == ENOTSUP && (flags & AT_SYMLINK_NOFOLLOW)) { ++ no_symlink_nofollow = 1; ++ goto no_symlink_nofollow; ++ } ++ if (errno == EINVAL && (flags & AT_EMPTY_PATH)) { ++ no_symlink_nofollow = 1; ++ goto proc_self_fd_path; ++ } ++ return ret; ++ ++no_symlink_nofollow: ++ if (*pathname) { ++ int open_flags = O_PATH | O_CLOEXEC; ++ if (flags & AT_SYMLINK_NOFOLLOW) ++ open_flags |= O_NOFOLLOW; ++ fd = openat(dirfd, pathname, open_flags); ++ if (fd == -1) ++ return -1; ++ } ++ /* fall through */ ++ ++proc_self_fd_path: ++ ret = chmod(proc_self_fd_path(fd, &buffer), mode); ++ if (ret == -1 && errno == ENOENT) ++ errno = EBADF; ++ if (fd != dirfd) { ++ int saved_errno = errno; ++ close(fd); ++ errno = saved_errno; ++ } ++ return ret; ++} +-- +2.35.6 +
meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p2.patch new file +761 -0
761 lines not on this page · raw message
meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p3.patch new file +439 -0
439 lines not on this page · raw message
meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p4.patch new file +140 -0
140 lines not on this page · raw message
meta/recipes-support/attr/acl/CVE-2026-54370_p1.patch new file +299 -0
299 lines not on this page · raw message
meta/recipes-support/attr/acl/CVE-2026-54370_p2.patch new file +403 -0
403 lines not on this page · raw message
meta/recipes-support/attr/acl/CVE-2026-54370_p3.patch new file +603 -0
603 lines not on this page · raw message
meta/recipes-support/attr/acl/CVE-2026-54370_p4.patch new file +213 -0
187 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.35.6
Part of the diff is not shown here. View the raw message.
Quoted 53 lines · On Wed Nov 4, 2026 at 6:53 AM CET, Darsh Kelaiya -X (dkelaiya - E INFOCHIPS…
From: Darsh Kelaiya <[email protected]>
Backport the upstream fixes for CVE-2026-54369 and CVE-2026-54370 to ACL 2.3.2.
CVE-2026-54369 adds descriptor-relative ACL APIs so callers can control symlink traversal. CVE-2026-54370 uses those APIs to harden getfacl, setfacl, setfacl --restore and chacl against path replacement races and unsafe symlink traversal.
Retain ACL 2.3.2 on the stable Wrynose branch and backport the security fixes with the required
_atAPIs and helper dependencies. This follows OE-Core's focus on security and bug fixes for stable branches [1], avoiding a general recipe upgrade to ACL 2.4.0. Existing pathname API behavior is preserved.The new public acl_*_at declarations conflict with private helpers using the same names in GNU tar 1.35. Patch 1 backports the upstream tar rename before patches 2 and 3 introduce and consume the new ACL APIs.
[1] https://docs.yoctoproject.org/6.0/ref-manual/release-process.html#stable-release-process
Darsh Kelaiya (3):
tar: avoid name conflicts with new libacl APIs
acl: fix CVE-2026-54369
acl: fix CVE-2026-54370.../tar/tar/Avoid-acl_-prefix-for-functions.patch | 103 ++ meta/recipes-extended/tar/tar_1.35.bb | 1 + .../attr/acl/CVE-2026-54369-dependent_p1.patch | 69 ++ .../attr/acl/CVE-2026-54369-dependent_p2.patch | 200 ++++ .../attr/acl/CVE-2026-54369-dependent_p3.patch | 712 +++++++++++++ meta/recipes-support/attr/acl/CVE-2026-54369_p1.patch | 719 +++++++++++++ meta/recipes-support/attr/acl/CVE-2026-54369_p2.patch | 957 ++++++++++++++++++ meta/recipes-support/attr/acl/CVE-2026-54369_p3.patch | 109 ++ .../attr/acl/CVE-2026-54370-dependent_p1.patch | 168 +++ .../attr/acl/CVE-2026-54370-dependent_p2.patch | 761 ++++++++++++++ .../attr/acl/CVE-2026-54370-dependent_p3.patch | 439 ++++++++ .../attr/acl/CVE-2026-54370-dependent_p4.patch | 140 +++ meta/recipes-support/attr/acl/CVE-2026-54370_p1.patch | 299 ++++++ meta/recipes-support/attr/acl/CVE-2026-54370_p2.patch | 403 ++++++++ meta/recipes-support/attr/acl/CVE-2026-54370_p3.patch | 603 +++++++++++ meta/recipes-support/attr/acl/CVE-2026-54370_p4.patch | 213 ++++ meta/recipes-support/attr/acl_2.3.2.bb | 14 + 17 files changed, 5910 insertions(+) create mode 100644 meta/recipes-extended/tar/tar/Avoid-acl_-prefix-for-functions.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369-dependent_p1.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369-dependent_p2.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369-dependent_p3.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369_p1.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369_p2.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54369_p3.patch
Quoted 8 lines
create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p1.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p2.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p3.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p4.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370_p1.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370_p2.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370_p3.patch create mode 100644 meta/recipes-support/attr/acl/CVE-2026-54370_p4.patch
Hello,
This is quite a big series ("5910 insertions(+)"). Looking at it, I think this might be just backporting most of the risky parts of the 2.4.0 upgrade, but then, we might just be better off simply upgrading to 2.4.0. Do you have thoughts about that? Are there definite breakage on a potential 2.4.0 upgrade?
Obviously, a 2.4.0 upgrade would need serious thoughts/discussion but this might be the way forward.
Regards,
Signature · 2 lines
Yoann Congal Smile ECS
Hi Yoann,
Thanks for reviewing this. I haven't identified any definite breakage specific to upgrading to ACL 2.4.0. My original choice followed the usual stable-branch backport approach.
I agree that this series already introduces substantial changes, including the new APIs, compatibility helpers and directory walker. Keeping the 2.3.2 version therefore does not necessarily provide a lower-risk result.
Upstream also recommends updating these packages even on older distributions:
I'm happy to evaluate the 2.4.0 upgrade. That would give us a firmer basis for considering an upgrade exception for Wrynose.
Regards,
Darsh
Quoted 91 lines · Yoann Congal
Quoted 63 lines · On Wed Nov 4, 2026 at 6:53 AM CET, Darsh Kelaiya -X (dkelaiya - E INFOCHIPS…
From: Darsh Kelaiya <[email protected]>
Backport the upstream fixes for CVE-2026-54369 and CVE-2026-54370 to ACL 2.3.2.
CVE-2026-54369 adds descriptor-relative ACL APIs so callers can control symlink traversal. CVE-2026-54370 uses those APIs to harden getfacl, setfacl, setfacl --restore and chacl against path replacement races and unsafe symlink traversal.
Retain ACL 2.3.2 on the stable Wrynose branch and backport the security fixes with the required
_atAPIs and helper dependencies. This follows OE-Core's focus on security and bug fixes for stable branches [1], avoiding a general recipe upgrade to ACL 2.4.0. Existing pathname API behavior is preserved.The new public acl_*_at declarations conflict with private helpers using the same names in GNU tar 1.35. Patch 1 backports the upstream tar rename before patches 2 and 3 introduce and consume the new ACL APIs.
[1] https://docs.yoctoproject.org/6.0/ref-manual/release-process.html#stable-release-process
Darsh Kelaiya (3):
tar: avoid name conflicts with new libacl APIs
acl: fix CVE-2026-54369
acl: fix CVE-2026-54370
.../tar/tar/Avoid-acl_-prefix-for-functions.patch| 103 ++ meta/recipes-extended/tar/tar_1.35.bb | 1 +.../attr/acl/CVE-2026-54369-dependent_p1.patch | 69 ++ .../attr/acl/CVE-2026-54369-dependent_p2.patch | 200 ++++ .../attr/acl/CVE-2026-54369-dependent_p3.patch | 712 +++++++++++++
meta/recipes-support/attr/acl/CVE-2026-54369_p1.patch| 719 +++++++++++++meta/recipes-support/attr/acl/CVE-2026-54369_p2.patch| 957
++++++++++++++++++meta/recipes-support/attr/acl/CVE-2026-54369_p3.patch| 109 ++.../attr/acl/CVE-2026-54370-dependent_p1.patch | 168 +++ .../attr/acl/CVE-2026-54370-dependent_p2.patch | 761 ++++++++++++++ .../attr/acl/CVE-2026-54370-dependent_p3.patch | 439 ++++++++ .../attr/acl/CVE-2026-54370-dependent_p4.patch | 140 +++ meta/recipes-support/attr/acl/CVE-2026-54370_p1.patch | 299 ++++++ meta/recipes-support/attr/acl/CVE-2026-54370_p2.patch | 403 ++++++++ meta/recipes-support/attr/acl/CVE-2026-54370_p3.patch | 603 +++++++++++ meta/recipes-support/attr/acl/CVE-2026-54370_p4.patch | 213 ++++ meta/recipes-support/attr/acl_2.3.2.bb | 14 + 17 files changed, 5910 insertions(+)create mode 100644
meta/recipes-extended/tar/tar/Avoid-acl_-prefix-for-functions.patchcreate mode 100644meta/recipes-support/attr/acl/CVE-2026-54369-dependent_p1.patchcreate mode 100644meta/recipes-support/attr/acl/CVE-2026-54369-dependent_p2.patchcreate mode 100644meta/recipes-support/attr/acl/CVE-2026-54369-dependent_p3.patchcreate mode 100644meta/recipes-support/attr/acl/CVE-2026-54369_p1.patchcreate mode 100644meta/recipes-support/attr/acl/CVE-2026-54369_p2.patchcreate mode 100644meta/recipes-support/attr/acl/CVE-2026-54369_p3.patchcreate mode 100644meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p1.patchcreate mode 100644meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p2.patchQuoted 8 lines
create mode 100644
meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p3.patchcreate mode 100644meta/recipes-support/attr/acl/CVE-2026-54370-dependent_p4.patchcreate mode 100644meta/recipes-support/attr/acl/CVE-2026-54370_p1.patchcreate mode 100644meta/recipes-support/attr/acl/CVE-2026-54370_p2.patchcreate mode 100644meta/recipes-support/attr/acl/CVE-2026-54370_p3.patchcreate mode 100644meta/recipes-support/attr/acl/CVE-2026-54370_p4.patchHello,
This is quite a big series ("5910 insertions(+)"). Looking at it, I think this might be just backporting most of the risky parts of the 2.4.0 upgrade, but then, we might just be better off simply upgrading to 2.4.0. Do you have thoughts about that? Are there definite breakage on a potential 2.4.0 upgrade?
Obviously, a 2.4.0 upgrade would need serious thoughts/discussion but this might be the way forward.
Regards,
--
Yoann Congal
Smile ECS